/* 全局样式 */
body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  margin: 0;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
  display: inline-block;
}

/* 表单容器 */
.upload-form {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
}

.upload-form h3 {
  margin-top: 0;
  color: #3498db;
  font-size: 1.3em;
}

/* 输入框样式 */
input[type="url"],
input[type="file"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  transition: border 0.3s;
}

input[type="url"]:focus,
input[type="file"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* 文件上传输入定制 */
input[type="file"] {
  padding: 10px;
  background: #f9f9f9;
  border: 1px dashed #ccc;
  text-align: center;
}

input[type="file"]::file-selector-button {
  background: #3498db;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
}

#add-url {
  background-color: #2980b9;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 15px;
  transition: background 0.3s;
}

#add-url:hover {
  background-color: #2980b9;
}

/* 按钮样式 */
button[type="submit"] {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  transition: background 0.3s;
}

button[type="submit"]:hover {
  background-color: #2980b9;
}

.upload-target {
  margin: 10px 0 20px;
}
.upload-target select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

/* 结果提示 */
#result {
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
}

/* 成功/错误消息 */
#result:not(:empty) {
  background: #e8f8f5;
  border-left: 4px solid #2ecc71;
  color: #27ae60;
}

#result:not(:empty):before {
  content: "✓ ";
}

/* 错误状态 */
#result.error {
  background: #fdecea;
  border-left: 4px solid #e74c3c;
  color: #c0392b;
}

#result.error:before {
  content: "✗ ";
}

/* 返回链接 */
a {
  display: inline-block;
  margin-top: 20px;
  color: #3498db;
  text-decoration: none;
  padding: 8px 15px;
  border: 1px solid #3498db;
  border-radius: 4px;
  transition: all 0.3s;
}

a:hover {
  background-color: #3498db;
  color: white;
}

/* 响应式设计 */
@media (min-width: 600px) {
  .upload-form {
    padding: 30px;
  }
  
  button[type="submit"] {
    width: auto;
    min-width: 150px;
  }
  
  /* 并排表单 */
  .form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}